// Learn TypeScript:
//  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/typescript.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    

    // onLoad () {}

    start () {

    }

     //关闭跳转
     clousetiaozhuan()
     {
         this.node.active = false
     }
 
 
     //气球跳转
     qiqiutiaozhun()
     {
         this.tiaozhuan("wx786ca788211b5b4a")
     }
 
     //猜字跳转
     caizitiaozhuan()
     {
         this.tiaozhuan("wxc4ffaf49623a5cf0")
     }

     
     //水果跳转
     水果tiaozhuan()
     {
         this.tiaozhuan("wx6860e9b2da6896b3")
     }

     //黑球白球跳转
     heiqiubaiqiutiaozhuan()
     {
         this.tiaozhuan("wxafe24ac00b4791cf")
     }

     //球VS激光跳转
     qiujiguang()
     {
         this.tiaozhuan("wx81a8739e4694459b")
     }

 
      //游戏跳转
      tiaozhuan(APPID)
      {
          if(window['wx'])
          {
              window['wx'].navigateToMiniProgram({
                  appId: APPID,
                  path: '',
                  envVersion: 'release',
                  success:(res)=>
                  {
                      console.log('跳转到其他游戏成功',res)
                  },
                  fail:(res)=>
                  {
                       console.log('跳转到其他游戏失败',res)
                  }
                })  
          }
      }

    // update (dt) {}
}
